package cm.yc.springcloud.filter;

import org.springframework.cloud.gateway.filter.GatewayFilterChain;
import org.springframework.cloud.gateway.filter.GlobalFilter;
import org.springframework.core.Ordered;
import org.springframework.web.server.ServerWebExchange;
import reactor.core.publisher.Mono;

/**
 * @Author DELL
 * @Date 2024/10/11 21:44
 * @Version 1.0
 */
public class CustomGateWayFilter implements GlobalFilter, Ordered {

	@Override
	public Mono<Void> filter(ServerWebExchange exchange, GatewayFilterChain chain) {
		String username = exchange.getRequest().getQueryParams().getFirst("username");
		String pwd = exchange.getRequest().getQueryParams().getFirst("pwd");
		return null;
	}

	@Override
	public int getOrder() {
		return 0;
	}
}
